Skip to content

Correct two regressions in Spring codegen #2247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

EgorkaKulikov
Copy link
Collaborator

Description

Fixes two significant regressions in Spring codegen:

  1. After Divide Spring unit and integration testing in codegen #2230 I introduced a bug that lateinit variable mockitoCloseableVariable is not initialized. Fixed in CgSpringUnitTestClassConstructor.

  2. After Fix StackOverflow errors in models with mocks processing #2157 I introduced a bug with missing mocks, now reverting changes. Stack overflow related problems still need to be fixed in Incorrect mocks are created for test with ToStringCreator.append #2158

How to test

Automated tests

Codegen regression on spring-petclinic and similar projects.

Manual tests

Manual verification of generated tests.

Self-check list

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@EgorkaKulikov EgorkaKulikov added comp-codegen Issue is related to code generator ctg-bug-fix PR is fixing a bug labels May 31, 2023
@EgorkaKulikov EgorkaKulikov requested a review from Damtev May 31, 2023 13:30
@EgorkaKulikov EgorkaKulikov enabled auto-merge (squash) May 31, 2023 13:48
@EgorkaKulikov EgorkaKulikov merged commit d000195 into main May 31, 2023
@EgorkaKulikov EgorkaKulikov deleted the egor/fix_mockitocloseablevariable_after_refactoring branch May 31, 2023 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-codegen Issue is related to code generator ctg-bug-fix PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants